#include<stdio.h>
#include<string.h>
#include<errno.h>

enum{  
    success=0,
    malloc_err,
    open_err 
};

const char* errorDesc(int code)
{
    switch(code)
    {
        case success:
            return "running sucess!";
        case malloc_err:
            return "malloc failure!";
        case open_err:
            return "file open failure!";
        default:
            return "unkown error!";
    }
}

int main()
{
  //  for(int i = 0; i < 100; i++)
  //     printf("%d:%s\n", i, strerror(i));
  //  int exit_code = malloc_err;
  //  printf("%s\n", errorDesc(exit_code));
   
    FILE* fp = fopen("log.txt","r");
    if(fp == NULL)
        printf("%d:%s\n", errno, strerror(errno));

   return 0;
}
